import * as articlesApi from '@/api/hmmm/articles'

const articles = {
  namespaced: true,
  state: {
    articlesList: {}
  },
  mutations: {
    SET_ARTICLES_LIST (state, newValue) {
      state.articlesList = newValue
    }
  },
  actions: {
    async updateArticlesList ({ commit }, params) {
      const res = await articlesApi.list(params)
      commit('SET_ARTICLES_LIST', res)
    }
  }
}
export default articles
